---
artifact: {{ $.ModuleName }}/{{ $.ImageName }}-artifact-dir-manager
from: {{ $.Images.BASE_GOLANG_20_ALPINE }}
fromCacheVersion: "2023-10-16.1"
git:
  - add: /{{ $.ModulePath }}modules/031-{{ $.ModuleName }}/images/{{ $.ImageName }}/dir-manager
    to: /src
    stageDependencies:
      install:
        - '**/*'
shell:
  installCacheVersion: "2023-10-16.2"
  install:
    - export "CGO_ENABLED=0"
    - export "GOOS=linux"
    - export "GOARCH=amd64"
    - cd /src
    - echo "Build manager"
    - GOPROXY={{ $.GOPROXY }} go build -o /tmp/manager main.go
    - chmod 0777 /tmp/manager
---
image: {{ $.ModuleName }}/{{ $.ImageName }}
fromImage: common/distroless
fromCacheVersion: "2023-10-16.3"
import:
 - artifact: {{ $.ModuleName }}/{{ $.ImageName }}-artifact-dir-manager
   add: /tmp/manager
   to: /manager
   after: install
